<?php

namespace App\V3\V3_2_6\Models;
use DateTimeInterface;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class AdminAddendumModel extends Model
{


    use HasFactory;

    protected $table = 'admin_addendum';
    protected $dateFormat = 'U';//这个时间字段被为被格式化为UNIX 时间戳的形式存储
    protected $fillable = ['main_id','is_share_customer','is_set_as_supplier','is_vip','vip_end_date','is_in_experience',
        'is_end_experience','album_amount','album_page_amount','empty_bill_amount','special_seal','one_key_album_times','express_check_times','account_storage','clear_watermark_or_not','file_total_size'];

    //toArray 时间转换问题
    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }

    /**
     * $dates 数组内的列转换为日期格式
     *
     * @var array
     */
    protected $dates = [
        'vip_end_date',
    ];

}
